<link rel="stylesheet" href="assets/common/plugins/umeditor/themes/default/css/umeditor.css">
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" method="post">
                    <div class="widget-body">
                        <fieldset>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">详情</div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">所属服务队 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['team_name'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">姓名 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['name'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">拼音 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['pinyin'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">性别 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['gender'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">电话 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['phone'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">身份证号 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['card_id'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">政治面貌 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['politics'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">籍贯 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['hometown'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">民族 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['nation'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">生日 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['birth_date'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">学历 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['education'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">是否为家庭成员 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?php if ($model['family'] == 1) : ?>
                                        <span class="am-badge">是</span>
                                    <?php elseif ($model['family'] == 0) : ?>
                                        <span class="am-badge">否</span>
                                    <?php endif; ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">推荐人及号码 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['referee'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">联系地址 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['address'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">工作单位 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['company'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">职务 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['duties'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">创建审核时间 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $model['create_time'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 身份证正面 </label>
                                <div class="am-u-sm-9 am-u-md-6 am-u-lg-5 am-u-end">
                                    <div class="goods-detail">
                                        <div class="goods-image">
                                            <img src="<?= $model['image_a'] ?>" style="width: 400px;height: auto">
                                        </div>
                                    </div>
                                </div>
                                <div class="am-u-sm-9 am-u-md-6 am-u-lg-5 am-u-end">
                                    <div class="goods-detail">
                                        <div class="goods-image">
                                            <img src="<?= $model['image_b'] ?>" style="width: 400px;height: auto">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">邮箱 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['e_mail'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">类别 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?php if (intval($info_second['category']) == 1) : ?>
                                        <span class="am-badge">创队会员</span>
                                    <?php elseif (intval($info_second['category']) == 2) : ?>
                                        <span class="am-badge">普通会员</span>
                                    <?php endif; ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">户口所在地 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['registered_address'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">服务队英文名字 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['team_english'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">户长 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['family_leader'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">关系 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['relationship'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">推荐人服务队名称 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['referee_team'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">人大代表或政协委员身份说明 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['deputies'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">是否担任过党代表 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?php if (intval($info_second['political']) == 0) : ?>
                                        <span class="am-badge">否</span>
                                    <?php elseif (intval($info_second['political']) == 1) : ?>
                                        <span class="am-badge">是</span>
                                    <?php endif; ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">是否为专业，复原，退伍军人 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?php if (intval($info_second['military']) == 0) : ?>
                                        <span class="am-badge">否</span>
                                    <?php elseif (intval($info_second['military']) == 1) : ?>
                                        <span class="am-badge">是</span>
                                    <?php endif; ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">军人类别 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['military_category'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">职业 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['career'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">简历 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['resume'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">是否有被刑事处罚/涉及刑事或监察立案未结案情形的 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?php if (intval($info_second['criminal']) == 0) : ?>
                                        <span class="am-badge">否</span>
                                    <?php elseif (intval($info_second['criminal']) == 1) : ?>
                                        <span class="am-badge">是</span>
                                    <?php endif; ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">被刑事处罚备注说明 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['criminal_content'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">参加服务队例会次数 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['meeting_count'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">参加服务次数 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['service_count'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">参加会员培训次数 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['train_count'] ?>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">邮编 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <?= $info_second['zip_code'] ?>
                                </div>
                            </div>
                            <div class="tpl-table-black-operation">
                            <a class="j-audit tpl-table-black-operation-del" data-id="<?= $model['id'] ?>"
                               href="javascript:void(0);">
                                <i class="am-icon-pencil"></i> 审核
                            </a>
                            </div>
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script id="tpl-dealer-withdraw" type="text/template">
    <div class="am-padding-top-sm">
        <form class="form-dealer-withdraw am-form tpl-form-line-form" method="post"
              action="<?= url('user/newExamine') ?>">
            <input type="hidden" name="id" value="{{ id }}">
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label"> 审核状态 </label>
                <div class="am-u-sm-9">
                    <label class="am-radio-inline">
                        <input type="radio" name="examine_status" value="1" data-am-ucheck
                               checked> 审核通过
                    </label>
                    <label class="am-radio-inline">
                        <input type="radio" name="examine_status" value="2" data-am-ucheck> 驳回
                    </label>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label"> 驳回原因 </label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" name="examine_remark" placeholder="仅在驳回时填写"
                           value="">
                </div>
            </div>
        </form>
    </div>
</script>

<script src="assets/common/plugins/umeditor/umeditor.config.js?v=<?= $version ?>"></script>
<script src="assets/common/plugins/umeditor/umeditor.min.js"></script>
<script src="assets/common/plugins/laydate/laydate.js"></script>
<script src="assets/store/js/select.data.js?v=<?= $version ?>"></script>
<script>
    $(function () {

        /**
         * 审核操作
         */
        $('.j-audit').click(function () {
            var $this = $(this);
            layer.open({
                type: 1
                , title: '新会员入会审核'
                , area: '340px'
                , offset: 'auto'
                , anim: 1
                , closeBtn: 1
                , shade: 0.3
                , btn: ['确定', '取消']
                , content: template('tpl-dealer-withdraw', $this.data())
                , success: function (layero) {
                    // 注册radio组件
                    layero.find('input[type=radio]').uCheck();
                }
                , yes: function (index, layero) {
                    // 表单提交
                    layero.find('.form-dealer-withdraw').ajaxSubmit({
                        type: 'post',
                        dataType: 'json',
                        success: function (result) {
                            result.code === 1 ? $.show_success(result.msg, result.url)
                                : $.show_error(result.msg);
                        }
                    });
                    layer.close(index);
                }
            });
        });

        // 选择图片
        $('.upload-file').selectImages({
            name: 'article[image_id]'
        });

        // 选择图片
        $('.upload-file2').selectImages({
            name: 'article[banner_id]'
        });

        // 选择图片
        $('.upload-file4').selectImages({
            name: 'article[header_id]'
        });
        // 选择图片
        $('.upload-file3').selectImages({
            name: 'article[images][]'
            , multiple: true
        });

        // 时间选择器
        laydate.render({
            elem: '.j-laydate-start'
            , type: 'datetime'
        });

        // 富文本编辑器
        UM.getEditor('container', {
            initialFrameWidth: 375 + 15,
            initialFrameHeight: 600
        });

        /**
         * 表单验证提交
         * @type {*}
         */
        $('#my-form').superForm();

    });
</script>
